import http from '../../utils/request'

export async function getQuestionBank() {
  return http.request({
    url: `/teacher/getQuestionBank`,
    method: 'get',
  })
}
export async function getQuestion(params) {
  return http.request({
    url: `/teacher/getQuestion`,
    method: 'get',
    params
  })
}
export async function removeBankQuestion(ids,banks) {
    return http.request({
      url: `/teacher/removeBankQuestion?questionIds=${ids}&banks=${banks}`,
      method: 'get',
    })
}
export async function addBankQuestion(ids,banks) {
    return http.request({
      url: `/teacher/addBankQuestion?questionIds=${ids}&banks=${banks}`,
      method: 'get',
    })
}

export async function deleteQuestion(ids) {
    return http.request({
      url: `/teacher/deleteQuestion?questionIds=${ids}`,
      method: 'get',
    })
}
export async function getQuestionById(id) {
    return http.request({
      url: `/teacher/getQuestionById/${id}`,
      method: 'get',
    })
}
export async function updateQuestions(data) {
    return http.request({
      url: `/teacher/updateQuestion`,
      method: 'post',
      data
    })
}
export async function addQuestion(data) {
    return http.request({
      url: '/teacher/addQuestion',
      method: 'post',
      data
    })
}